package com.qf.day13;

import java.util.*;

public class PokerUtils {
    public static Set<Poker> createPoker(Poker poker) {
        LinkedHashSet<Poker> pokers = new LinkedHashSet<>();

        for (String t : poker.createType()) {
            int i=0;
            for (String c : poker.createCount()) {
                Poker onePoker = new Poker(t, c,i++);
                pokers.add(onePoker);
            }
        }
        Poker joker  = new Poker();
        joker.setCount("小王");
        joker.setValue(13);
        pokers.add(joker);
        Poker king = new Poker();
        king.setCount("大王");
        king.setValue(14);
        pokers.add(king);
        return pokers;
    }

    public static void play() {

    }

    public static void main(String[] args) {
        Poker poker = new Poker();
        Set<Poker> set = createPoker(poker);
//        set.forEach(e-> System.out.println(e));
        List<Poker> pokerList = new ArrayList<>(set); //需要一个List
        //打乱顺序
       Collections.shuffle(pokerList);
        pokerList.forEach(e-> System.out.println(e));

        List<Poker> lis1 = new ArrayList<>();
        List<Poker> lis2 = new ArrayList<>();
        List<Poker> lis3 = new ArrayList<>();
        play();
    }
}
